home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / utils / textextract / textextract.s
Text File  |  1980-01-03  |  15KB  |  551 lines

  1. *******************************************************************************
  2. * Scan_Diz                       Copyright © 1994 2-Cool/EX4!
  3. * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  4. * $Release    : 0.1 $
  5. * $Revision    : 1.01 $
  6. * $Date        : 12-Jan-94 $
  7. *
  8. * $Author(s)    : Written by 2-Cool/EX4! (In MC680x0 Assembly under Asm-One)
  9. * $Note(s)    : Position Independacy off a4 - (WARNING: DON`T TRASH A4!)
  10. *        : Execbase Ptr is cached so that if running in fastmem access
  11. *        : to execbase ptr is faster.
  12. *
  13. * $Purpose    : For calculating the checksum of a file to see if its been
  14. *        : either corrupted or modified by some lamers like fish, etc.
  15. *        : trying to rip off your work...
  16. *******************************************************************************
  17. AbsExecBase    =    4            /* Execbase Definition */
  18. SUCCESS        =    0            /* result return codes... */
  19. VAR_ERROR    =    1            /* memory alloction failcode */
  20. CSI        =    $1b
  21. CLS        macro
  22.         dc.b    CSI,'c',LF
  23.         endm
  24.         
  25. *-------------- Definition Includes...
  26.  
  27.         incdir    _include:
  28.         include    exec/exec.i
  29.         include    "include:exec/funcdef.i"
  30.         include    intuition/intuition.i
  31.         include    graphics/videocontrol.i
  32.         include    libraries/asl.i
  33.         include    libraries/gadtools.i
  34.         include    libraries/dos_lib.i
  35.         include    libraries/intuition_lib.i
  36.         include    libraries/graphics_lib.i
  37.         include    libraries/exec_lib.i
  38.         include    libraries/asl_lib.i
  39.         include    libraries/icon_lib.i
  40.         include    libraries/diskfont_lib.i
  41.         include    libraries/gadtools_lib.i
  42.         include    libraries/wb_lib.i
  43.         include    libraries/rexxsyslib_lib.i
  44.         include    libraries/utility_lib.i
  45.         include    libraries/dosextens.i
  46.         include    utility/tagitem.i
  47.         include    dos/datetime.i
  48.         include    libraries/reqtools.i
  49.         
  50. *-------------- Definition of Main Variables (Public) Block...
  51.  
  52.         STRUCTURE VarsBlock,0
  53.  
  54.         APTR    _ExecBase            /* ExecBase base */
  55.         APTR    _DOSBase            /* DOS lib base */
  56.         APTR    _DOSOutput            /* DOS output base */
  57.         APTR    _ArgPtr
  58.         APTR    _ArgPtr2
  59.         ULONG    _ArgLen
  60.  
  61.         APTR    ProgBuff            /* ptr to progbuffer */
  62.         APTR    ProgHandle            /* ptr to filehandle */
  63.         ULONG    ProgSize            /* length file */
  64.  
  65.         APTR    DizStart
  66.         APTR    DizEnd
  67.         APTR    DizSize
  68.  
  69.         LABEL    vars_SIZEOF
  70.  
  71. *-------------- Definition of Macros...
  72.  
  73. PUSH        macro
  74.         movem.l    \1,-(sp)
  75.         endm
  76. PULL        macro
  77.         movem.l    (sp)+,\1
  78.         endm
  79. PUSHW        macro
  80.         movem.w    \1,-(sp)
  81.         endm
  82. PULLW        macro
  83.         movem.w    (sp)+,\1
  84.         endm
  85. PUSHR        macro
  86.         move.l    \1,-(sp)
  87.         endm
  88. PULLR        macro
  89.         move.l    (sp)+,\1
  90.         endm
  91. CALL        macro
  92.         jsr    _LVO\1(a6)
  93.         endm
  94. CALLJ        macro
  95.         jmp    _LVO\1(a6)
  96.         endm
  97. CALLREL        macro
  98.         move.l    \2(a4),a6
  99.         CALL    \1
  100.         endm
  101.         
  102. *******************************************************************************
  103. *-------------- Allocate our Variables (RS.) Area
  104.  
  105. ProgStart:    move.l    a0,a5
  106.         move.l    d0,d5
  107.  
  108.         move.l    #vars_SIZEOF,d0        ;length for our variables
  109.         move.l    #MEMF_PUBLIC+MEMF_CLEAR,d1 ;we want public mem, cleared
  110.         move.l    (AbsExecBase).w,a6    ;get SysBase
  111.         CALL    AllocMem        ;allocate it...
  112.         move.l    d0,a4            ;ptr to our RS.Variables base
  113.         bne.s    RSValid            ;did the alloc fail, if so exit
  114.         moveq    #VAR_ERROR,d0        ;Memory allocation fail code
  115.         rts                ;exit to dos...
  116.  
  117. *-------------- From here a4 points to our variables area (DON`T DESTROY A4!)
  118.  
  119. RSValid:    move.l    a6,(a4)            ;cache execptr in Public so if
  120.         move.l    a5,_ArgPtr(a4)
  121.         move.l    d5,_ArgLen(a4)
  122.         sf.b    -1(a5,d5.w)        ;null terminate arg string..
  123.  
  124. *-------------- Open DOS Library
  125.  
  126.         moveq    #0,d0            ;set lib version
  127.           lea    Dosname(pc),a1        ;lib name in a1
  128.           CALL    OpenLibrary        ;try to open library
  129.           move.l    d0,_DOSBase(a4)        ;store lib base
  130.           beq.w    ShutDown        ;cleanup and quit if fail
  131.  
  132. *-------------- Get DOS Output
  133.  
  134.         move.l    d0,a6            ;get dosbase
  135.         CALL    Output            ;get output base
  136.         move.l    d0,_DOSOutput(a4)    ;save outputbase
  137.  
  138. *-------------- Program starts here
  139.  
  140.         lea    About.Txt(pc),a0        ;format string
  141.         bsr.w    OSPutStr
  142.  
  143.         move.l    _ArgPtr(a4),a0
  144.         move.b    (a0)+,d0        ;we are in fastmem were faster
  145.         cmp.b    #"e",d0
  146.         beq.s    do_extract
  147.         cmp.b    #"a",d0
  148.         beq.w    no_adding
  149.  
  150. *-------------- check for extracting...
  151.  
  152. do_extract:    cmp.b    #"?",(a0)
  153.         bne.s    no_usage
  154.  
  155.         lea    Args.Txt(pc),a0        ;format string
  156.         bsr.w    OSPutStr
  157.         bra.w    ShutDown
  158.         
  159. no_usage:    tst.b    (a0)+
  160.         move.l    a0,a1
  161.         move.l    _ArgLen(a4),d1
  162. .findname:    cmp.b    #" ",(a1)+
  163.         beq.s    found
  164.         subq.l    #1,d1
  165.         bne.s    .findname
  166.  
  167.         lea    Args.Txt(pc),a0        ;format string
  168.         bsr.w    OSPutStr
  169.         bra.w    ShutDown
  170.  
  171. found        tst.b    -(a1)
  172.         sf.b    (a1)+
  173.         move.l    a1,_ArgPtr2(a4)
  174.  
  175.         
  176.         bsr.w    LoadDOSFile
  177.         cmp.b    #-2,d0
  178.         beq.w    LoadFailedMem        ;load 'express failed'
  179.         cmp.b    #-1,d0
  180.         beq.w    LoadNotFound
  181.  
  182.         lea    Scan.txt(pc),a0        ;format string
  183.         bsr.w    OSPutStr
  184.  
  185. *-------------- Search for Diz Start
  186.  
  187.         move.l    ProgBuff(a4),a0        ;start adr
  188.         move.l    a0,a1
  189.         add.l    ProgSize(a4),a1        ;end adr
  190.         lea    StartDiz.txt(pc),a2    ;string to find
  191.         bsr.w    FindString
  192.         bne.w    StartDiz_Error
  193.  
  194.         lea    18(a0),a0        ;skip header
  195.         move.l    a0,DizStart(a4)        ;start of description found?
  196.  
  197. *-------------- Search for Diz End
  198.  
  199.         lea    EndDiz.txt(pc),a2
  200.         bsr.w    FindString
  201.         bne.w    EndDiz_Error
  202.         move.l    a0,DizEnd(a4)        ;end of description found?
  203.  
  204.         sub.l    DizStart(a4),a0
  205.         move.l    a0,DizSize(a4)
  206.  
  207.         cmp.l    #512,a0        ;description over 1k??
  208.         beq.w    DizSize_TooBig
  209.  
  210. *-------------- Copy File_ID Diz to destination buffer
  211.  
  212.         move.l    a0,d0
  213.         move.l    DizStart(a4),a1        ;memadr
  214.         move.l    _ArgPtr2(a4),a0
  215. *-------------- Program ends here
  216.  
  217. *-------------- d0=length
  218. *        a0=filename
  219. *        a1=mem adr
  220.         bsr    SaveMem2File
  221.         cmp.b    #1,d0            ;d0.l = result-code..
  222.         beq.w    SaveError
  223.  
  224.         lea    FoundDiz.txt(pc),a0        ;format string
  225.         bsr.w    OSPutStr
  226.  
  227.         move.l    DizStart(a4),a0        ;memadr
  228.         move.l    DizSize(a4),d0
  229.         sf.b    (a0,d0.w)
  230.         bsr.w    OSPutStr
  231.  
  232.         lea    Done.txt(pc),a0        ;format string
  233.         bsr.w    OSPutStr
  234.  
  235. *******************************************************************************
  236. * Shutdown() - Free all allocated resources & exit program
  237. * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  238. * Frees all previously allocated resources, sanity checks are made so only
  239. * allocated memory/open libraries will be removed.
  240. *******************************************************************************
  241. *-------------- Free DOS Library
  242.  
  243. ShutDown:    bsr    FreeDOSFile
  244.  
  245.         move.l    _DOSBase(a4),d0        ;dos lib base in a1
  246.         beq.s    RSFreeMem
  247.         move.l    d0,a1
  248.           CALL    CloseLibrary        ;close intuition
  249.         clr.l    _DOSBase(a4)        ;clear out base
  250.         
  251. *-------------- Free RS Variables Area
  252.  
  253. RSFreeMem:    move.l    a4,a1            ;ptr to our RS.Variables base
  254.         move.l    #vars_SIZEOF,d0        ;no. of bytes to free
  255.         move.l    (a4),a6            ;get execbase
  256.         CALL    FreeMem            ;free the memory
  257.  
  258.         moveq    #SUCCESS,d0        ;no return code
  259.         rts                ;exit...
  260.  
  261. *******************************************************************************
  262. * OSPutStr
  263. * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  264. * Sends a ascii text string to current console output
  265. * $Inputs:    a0.l = String ptr (null terminated)
  266. *******************************************************************************
  267.  
  268. OSPutStr:    move.l    a0,d2
  269.         moveq    #-1,d3            ;d4=0
  270. .getlen2    addq.l    #1,d3            ;increase string length by 1
  271.         tst.b    (a0)+            ;increase position
  272.         bne.s    .getlen2        ;nope not found, so keep on
  273.  
  274.         move.l    _DOSOutput(a4),d1
  275.         move.l    _DOSBase(a4),a6
  276.         jmp    _LVOWrite(a6)        ;print error msg to cli
  277.  
  278.  
  279. *******************************************************************************
  280. * _LoadDOSFile :- Loads an AmigaDOS file from any device into memory
  281. * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  282. * INPUTS:    a0 (.L)    = Filename
  283. *
  284. * OUTPUTS:    d0 (.L) = Result Code (0=File Ok,-1=Load Failed!)    
  285. *        d1 (.L) = Length
  286. *******************************************************************************
  287.     
  288. LoadDOSFile:    movem.l    d2-d7/a0-a6,-(sp)
  289.         clr.l    ProgHandle(a4)
  290.         clr.l    ProgBuff(a4)
  291.         clr.l    ProgSize(a4)
  292.  
  293. ;-------------- Open file
  294.         move.l    a0,d1            ;get filename
  295.         move.l    #MODE_OLDFILE,d2
  296.         move.l    _DOSBase(a4),a6
  297.         jsr    _LVOOpen(a6)        ;open file
  298.         move.l    d0,ProgHandle(a4)
  299.         beq.s    NotFound
  300.  
  301. ;-------------- Get Length of file
  302.  
  303.         move.l    d0,d5            ;ProgHandle
  304.         move.l    d5,d1            ;file handle
  305.         moveq    #0,d2
  306.         moveq    #1,d3
  307.         move.l    _DOSBase(a4),a6
  308.         jsr    _LVOSeek(a6)        ;seek start of file
  309.         move.l    d5,d1            ;file handle
  310.         moveq    #0,d2
  311.         moveq    #-1,d3
  312.         jsr    _LVOSeek(a6)        ;seek end of file
  313.         move.l    d0,ProgSize(a4)
  314.  
  315. ;-------------- Allocate Memory for file
  316.  
  317.         move.l    4.w,a6            ;get execbase
  318.         move.l    #MEMF_PUBLIC,d1        ;we want public mem
  319.         CALL    AllocMem        ;allocate it...
  320.         move.l    d0,ProgBuff(a4)        ;save base
  321.         beq.b    TooBig            ;fail?
  322.  
  323. ;-------------- Load in whole file
  324.                 
  325.         move.l    ProgHandle(a4),d1
  326.         move.l    d0,d2
  327.         move.l    ProgSize(a4),d3
  328.         move.l    _DOSBase(a4),a6
  329.         jsr    _LVORead(a6)        ;read file
  330.  
  331. ;-------------- Close file
  332.  
  333. CloseFile:    move.l    ProgHandle(a4),d1
  334.         jsr    _LVOClose(a6)        ;close file
  335.  
  336.         move.l    ProgSize(a4),d1    ;d1=ProgSize
  337.         move.l    ProgBuff(a4),a1        
  338.  
  339.         movem.l    (sp)+,d2-d7/a0-a6
  340.         moveq    #0,d0            ;resultcode (okay)
  341.         rts
  342.  
  343. NotFound:    movem.l    (sp)+,d2-d7/a0-a6
  344.         move.b    #-1,d0            ;file not found error-code
  345.         rts
  346.  
  347. TooBig:
  348.         move.l    ProgHandle(a4),d1
  349.         move.l    _DOSBase(a4),a6
  350.         jsr    _LVOClose(a6)        ;close file
  351.         movem.l    (sp)+,d2-d7/a0-a6
  352.         move.b    #-2,d0            ;file too big error-code
  353. NotAlloc    rts
  354.  
  355. ;-------------- Free Memory for DOSFile
  356.  
  357. FreeDOSFile:    move.l    (AbsExecBase).w,a6    ;get execbase
  358.         move.l    ProgBuff(a4),d0        ;ptr to our RS.Variables base
  359.         move.l    d0,a1
  360.         beq.s    NotAlloc
  361.         move.l    ProgSize(a4),d0        ;no. of Bytes to free
  362.         beq.s    NotAlloc
  363.         jmp    _LVOFreeMem(a6)        ;free the memory
  364.  
  365. *******************************************************************************
  366. * SaveMem2File
  367. * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  368. * $Inputs:    a0.l    = Filename
  369. *        a1.l    = Mem Address
  370. *        d0.l    = Save Length
  371. *
  372. * $Outputs:    d0.l    = 0 - success
  373. *        d0.l    = 1 - failure
  374. *******************************************************************************
  375.  
  376. SaveMem2File:    movem.l    d2-d7/a0-a6,-(sp)
  377.         move.l    a0,d1            ;filename
  378.         move.l    a1,d5            ;progbuffer
  379.         move.l    d0,d6            ;proglength
  380.         move.l    #MODE_NEWFILE,d2
  381.         move.l    _DOSBase(a4),a6
  382.         jsr    _LVOOpen(a6)
  383.         move.l    d0,d7
  384.         beq.b    _SaveError
  385.         move.l    d7,d1            ;fh...
  386.         move.l    d5,d2            ;adr
  387.         move.l    d6,d3            ;length
  388.         jsr    _LVOWrite(a6)        ;write file
  389.         move.l    d7,d1
  390.         jsr    _LVOClose(a6)        ;close file
  391.         movem.l    (sp)+,d2-d7/a0-a6
  392.         moveq    #0,d0
  393.         rts
  394. _SaveError:    movem.l    (sp)+,d2-d7/a0-a6
  395. remcode        moveq    #1,d0
  396.         rts
  397.  
  398. LoadFailedMem    lea    ErrorMem.txt(pc),a0
  399.         bra.s    OSPut
  400. LoadNotFound    lea    ErrorLoad.txt(pc),a0
  401.         bra.s    OSPut
  402. EndDiz_Error:
  403. StartDiz_Error:
  404. DizSize_TooBig
  405. NoDiz:        lea    NoDiz.txt(pc),a0
  406.         bra.s    OSPut
  407. no_adding:    lea    NoAdd.txt(pc),a0
  408.         bra.s    OSPut
  409. SaveError    lea    ErrorSave.txt(pc),a0
  410. OSPut        bsr.w    OSPutStr
  411.         bra    ShutDown
  412.  
  413.  
  414. *******************************************************************************
  415. * FindString
  416. * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  417. * This routine will scan through Memory for a ascii (case dependant) string.
  418. * The routine will not find its 'search string' if the start and end addresses 
  419. * are within the same address range as an added precaution.
  420. *
  421. * INPUTS ;    a0.l=start address for search
  422. *         a1.l=end address for search
  423. *         a2.l=string to search for
  424. *
  425. * OUTPUTS;    d0.b=If failed to located string =$FF.B, else =$00.B FOUND!
  426. *        a0.l=ptr to string
  427. *******************************************************************************
  428.  
  429. FindString:    movem.l    a1-a6,-(sp)
  430.         subq.l    #4,a0
  431.         bsr.s    Search
  432.         movem.l    (sp)+,a1-a6
  433.         rts
  434.  
  435. cmp4bytesd2:    macro
  436.         cmp.b    (a0)+,d2        ;do these 4 bytes match source?
  437.         beq.s    \1
  438.         cmp.b    (a0)+,d2        ;do these 4 bytes match source?
  439.         beq.s    \1
  440.         cmp.b    (a0)+,d2        ;do these 4 bytes match source?
  441.         beq.s    \1
  442.         cmp.b    (a0)+,d2        ;do these 4 bytes match source?
  443.         beq.s    \1
  444.         endm
  445. cmp32bytes    macro
  446.         cmp4bytesd2 .yup
  447.         cmp4bytesd2 .yup
  448.         cmp4bytesd2 .yup
  449.         cmp4bytesd2 .yup
  450.         cmp4bytesd2 .yup
  451.         cmp4bytesd2 .yup
  452.         cmp4bytesd2 .yup
  453.         cmp4bytesd2 .yup
  454.         bra.s    \1
  455. .yup:        move.l    d4,d3
  456. .cmp:        cmpm.b    (a2)+,(a0)+
  457.         dbne    d3,.cmp
  458.         bne.w    _Not_It
  459.         sub.l    d6,a0
  460.         rts
  461.         endm
  462.  
  463. Search:        move.l    a2,a3
  464.         moveq    #-3,d4            ;d4=0
  465. .getlen        addq.l    #1,d4            ;increase string length by 1
  466.         tst.b    (a2)+            ;increase position
  467.         bne.s    .getlen            ;nope not found, so keep on
  468.         move.l    a3,a2
  469.         move.l    d4,d6
  470.         addq.l    #2,d6
  471.         moveq    #0,d5            ;d5=0
  472.         move.b    (a2)+,d2
  473. _Not_It        move.l    a3,a2            ;a3=search string ptr
  474.         tst.b    (a0)+            ;incr search pos
  475.         tst.b    (a2)+
  476. _contt        lea    -512(a1),a4        ;>512 bytes left to search?
  477.         cmp.l    a4,a0
  478.         blt.s    fastcmp            ;if so do a 512 byte search...
  479. _cmpcontt    cmp.b    (a0)+,d2        ;does this byte match string byte?
  480.         beq.s    _nbyte            ;yes!,lets investigate more...
  481.         cmp.l    a1,a0            ;end of Memory region reached?
  482.         blt.s    _cmpcontt        ;yes,so string wasn`t found!
  483.         st    d0            ;d0=not found!
  484.         rts
  485. _nbyte:        move.l    d4,d3
  486. _nloop:        cmpm.b    (a2)+,(a0)+
  487.         dbne    d3,_nloop
  488.         bne.s    _Not_It
  489.         sub.l    d6,a0
  490.         rts
  491. fastcmp        cmp32bytes _1            ;test 512 Bytes FAAAAST
  492. _1        cmp32bytes _2
  493. _2        cmp32bytes _3
  494. _3        cmp32bytes _4
  495. _4        cmp32bytes _5
  496. _5        cmp32bytes _6
  497. _6        cmp32bytes _7
  498. _7        cmp32bytes _8
  499. _8        cmp32bytes _9
  500. _9        cmp32bytes _10
  501. _10        cmp32bytes _11
  502. _11        cmp32bytes _12
  503. _12        cmp32bytes _13
  504. _13        cmp32bytes _14
  505. _14        cmp32bytes _15
  506. _15        cmp32bytes _16
  507. _16        cmp.l    a4,a0
  508.         blt.w    fastcmp
  509.         bra.w    _cmpcontt
  510.  
  511. StartDiz.txt:    dc.b    "@BEGIN_FILE_ID.DIZ",0
  512.         even
  513. EndDiz.txt:    dc.b    "@END_FILE_ID.DIZ",0
  514.         even        
  515. ******************************************************************************
  516. * String & Data Variable definitions
  517.  
  518. Dosname:    dc.b    'dos.library',0                ;dos lib name
  519.         even
  520. ErrorAlloc.txt    dc.b    $a,'Error: Out of Memory!',$a,0
  521.         even
  522. ErrorMem.txt    dc.b    $a,'Error: Not enough memory to load file!',$a,0
  523.         even
  524. ErrorLoad.txt    dc.b    $a,'Error: Cannot open file!',$a,$a,0
  525.         even
  526. ErrorSave.txt    dc.b    $a,'Error: Cannot save file!',$a,$a,0
  527.         even
  528. Scan.txt:    dc.b    'Scanning for file_id in file...',$a,$a,0
  529.         even
  530. NoAdd.txt:    dc.b    'Sorry, Adding of "FILE.ID_DIZ" not yet supported!',$a,$a,0
  531.         even
  532. FoundDiz.txt:    dc.b    'Found a file_id in file, viewing;',$a,$a,0
  533.         even
  534. NoDiz.txt:    dc.b    $a,'Sorry, this textfile does not contain a vaild "file_id.diz" description!',$a,$a,0
  535.         even
  536. Done.txt:    dc.b    $a,$a,'Operation Successful!',$a,$a,0
  537.         even
  538. About.Txt:    CLS    ; clear screen
  539.         dc.b    CSI,'[0m',CSI,'[1mTXTExtract v0.1',CSI,'[0m ',CSI,'[33m(Turbo Version) ',CSI,'[0m',CSI,'[3mBy 2-Cool/EX4!',LF
  540.         dc.b    CSI,'[0mCopyright EX4 © 1993-94. All Rights Are Reserved.',LF
  541.         dc.b    'Last Assembled: 18-Oct-94.',LF
  542.         dc.b    $a
  543.         dc.b    0
  544.         even
  545. Args.Txt:    dc.b    'Usage   : ',CSI,'[32mTXTExtract ',CSI,'[31m<opt> <src> <dest>',LF
  546.         dc.b    'Example : ',CSI,'[32mTXTExtract ',CSI,'[31me lsd-suxx.txt bbs:file_id.diz',LF,LF
  547.         dc.b    '        : Where <opt> is <e>xtract description.',LF
  548.         dc.b    '        :             or <a>dd description.',LF,LF
  549.         dc.b    0
  550.